<script setup>
const props = defineProps({
  width: {
    type: Number
  }
})
//可视窗口高度
const wh = window.innerHeight
</script>
<template>
  <transition
    appear
    name="custom-classes-transition"
    enter-active-class="animate__animated animate__faster  animate__fadeInRight "
    leave-active-class="animate__animated animate__faster animate__fadeOutRight "
  >
    <div class="right_box" :style="{ width: (width / 100) * (wh / 1080) + 'rem' }">
      <div class="content">
        <slot></slot>
      </div>
    </div>
  </transition>
</template>

<style lang="scss" scoped>
.right_box {
  position: absolute;
  width: 360px;
  top: 100px;
  bottom: 30px;
  right: 0;
  box-sizing: border-box;
  background: rgba(9, 14, 24, 0.7);
  z-index: 9;
  overflow: hidden;

  &::before {
    position: absolute;
    content: '';
    top: 0;
    left: 50%;
    width: 200px;
    height: 2px;
    transform: translateX(-50%);
    background: linear-gradient(270deg, rgba(0, 213, 255, 0) 0%, #00d5ff 100%);
  }

  &::after {
    position: absolute;
    content: '';
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(270deg, rgba(0, 213, 255, 0) 0%, #00d5ff 100%);
  }

  .content {
    width: 100%;
    height: 100%;
    position: relative;

    &::before {
      position: absolute;
      content: '';
      bottom: 0;
      width: 3px;
      height: 64px;
      background: #00d5ff;
    }
  }
}
</style>
